home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Languages / Prograph Classic 2.6.1 / Examples / Table ƒ / Table Read Me next >
Encoding:
Text File  |  1995-09-29  |  2.6 KB  |  55 lines  |  [TEXT/ttxt]

  1. Example:                        Table Class
  2. Written by:                    John Garden, Pictorius Incorporated
  3. Updated for 2.6.1 by:            The Tech Support Team, Pictorius Incorporated
  4.  
  5. Contents:     Table.pgs
  6.                    Table Read Me
  7.  
  8. Needs Prograph Extensions:
  9.                    The default configuration of your 'Prograph Extensions' folder.
  10.  
  11. Needs Libraries to Compile:
  12.                    SCLibrary 2.6
  13.                    Library 2.6
  14.  
  15. Description
  16. -----------
  17. This is an example of a scrolling table with multiple columns.  You can set the width and justification of each column independently.  The file Table.pgs contains the Table class, and a Demo Window which demonstrates how to use it.
  18.  
  19. Select Run from the Exec menu and the Table Demo window will appear.
  20. You may change various attributes of the Table using the Pop-up Menus,
  21. Radio Buttons, and Check Boxes in the window.  The code for these items
  22. resides in the Table Demo class. You can access it while running by
  23. holding down command-shift-option while you click on an item.
  24.  
  25.  
  26. How to Use The Table  Class in Your Program
  27. -----------------------------------------
  28.  
  29. The Table class is intended to be used in the same way as the Scroll List
  30. class. It contains attributes analogous to those of the Scroll List class to
  31. determine its appearance and functionality. Most of these attributes are
  32. functionally identical in both classes. Two of them, however, are
  33. different:
  34.  
  35. The value list attribute in a Scroll List contains a list of strings. In a
  36. Table it contains a list of sub-lists. Each such sub-list represents one row
  37. in the Table, and is itself a list of strings.
  38.  
  39. The columns attribute does not exist in the Scroll List class. In the Table,
  40. it serves to define the columns of the Table. The columns attribute 
  41. consists of a list of sub-lists. Each sub-list corresponds to one column in
  42. the Table, and contains a pair of integer values. These values are the
  43. width of the column ( in pixels ), and the justification of the column (left=0, center=1, or right=-1 ). 
  44.  
  45. The number of columns defined for a Table is defined by the number of
  46. sub-lists in the columns attribute. Note that a row in the value list may
  47. contain any number of entries. If this number exceeds the number of
  48. columns, the extra entries are ignored. If there are fewer entries than
  49. columns, the remainder of the row is left blank.
  50.  
  51.    The Table class also contains a number of overshadowed set methods
  52. for various attributes. They ensure that the Table is properly updated
  53. when an attribute is set. Be sure to use these set methods in your
  54. program when setting these attributes.
  55.